<?php

$obj = new stdClass();
$obj->success = true;

if (count($hotels) == 0) {
	$obj->countHotels = 0;
	$obj->hotelString = '';
} else {
	$obj->countHotels = count($hotels);
	$obj->hotelString = '<br /><br />';
	
	foreach ($hotels as $hotel) {
		$obj->hotelString .= '<a href="/admin/hotel/edit/id/' . $hotel['id'] . '/">' . $hotel['title'] . '</a><br />'; 
	}
	
	$obj->hotelString .= '<br />';
}

echo json_encode($obj);